package com.rtx.config.shiro;

import java.io.Serializable;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.apache.shiro.web.util.WebUtils;

import com.rtx.model.emums.EnumDataType;

/**
 * session
 *
 * @author Zy
 */
public class SessionManager extends DefaultWebSessionManager {

    public SessionManager() {
        super();
    }

    @Override
    protected Serializable getSessionId(ServletRequest request, ServletResponse response) {
        return WebUtils.toHttp(request).getHeader(EnumDataType.AUTHORIZATION.getValue());
    }
}
